return (
xmlHeader +
- xml.substr(ifaceStartIndex, ifaceEndIndex - ifaceStartIndex) +
+ xml.substring(ifaceStartIndex, ifaceEndIndex) +
xmlFooter);
}
let event = new CalendarEvent(id, date, end, summary);
/* It's a recurring event */
if (!id.endsWith('\n')) {
- const parentId = id.substr(0, id.lastIndexOf('\n') + 1);
+ const parentId = id.substring(0, id.lastIndexOf('\n') + 1);
if (!handledRemovals.has(parentId)) {
handledRemovals.add(parentId);
this._removeMatching(parentId);
this.connect('style-changed', () => {
let [hasColor, color] = this.get_theme_node().lookup_color('link-color', false);
if (hasColor) {
- let linkColor = color.to_string().substr(0, 7);
+ let linkColor = color.to_string().substring(0, 7);
if (linkColor !== this._linkColor) {
this._linkColor = linkColor;
this._highlightUrls();
let pos = 0;
for (let i = 0; i < urls.length; i++) {
let url = urls[i];
- let str = this._text.substr(pos, url.pos - pos);
+ let str = this._text.substring(pos, url.pos);
markup += `${str}<span foreground="${this._linkColor}"><u>${url.url}</u></span>`;
pos = url.pos + url.url.length;
}
- markup += this._text.substr(pos);
+ markup += this._text.substring(pos);
this.clutter_text.set_markup(markup);
}
if (text.lastIndexOf(' ') === -1)
prefix = text;
else
- prefix = text.substr(text.lastIndexOf(' ') + 1);
+ prefix = text.substring(text.lastIndexOf(' ') + 1);
let postfix = this._getCompletion(prefix);
if (postfix != null && postfix.length > 0) {
o.insert_text(postfix, -1);
}
if (k === 0)
return '';
- return s1.substr(0, k);
+ return s1.substring(0, k);
}
let paths = GLib.getenv('PATH').split(':');
return null;
let common = results.reduce(_getCommon, null);
- return common.substr(text.length);
+ return common.substring(text.length);
}
_getCompletion(text) {